n,m = map(int,input().split())

data = []

for i in range(n):
    data.append(list(map(int,input().split())))


for i in range(n):
    print(input())
